package com.ms.demo.demo2;

import java.util.HashMap;
import java.util.Map;

/**
 * @description: 创建Context上下文类
 * @author: ms
 * @create: 2022-10-28 11:28
 */
public class Context {

    private Map<Expression, Integer> map = new HashMap<>();

    //添加解析器对象
    public void add(Expression s, Integer value){
        map.put(s, value);
    }
    //获取解析后的值
    public int getValue(Expression s){
        return map.get(s);
    }
}